<script lang="ts" setup>
import axios from "axios";
import { ref } from "vue";
import Show from "../Show.vue";
const data = ref<number[]>([]);
console.log(data.value);
setTimeout(() => {
  data.value = [1];
}, 2000);

axios
  .get("http://magick.plugin/wp-json/")
  .then((response) => {
    console.log("Website created on:", response.data.date);
  })
  .catch((error) => {
    console.error(error);
  });
</script>

<template>
  <Show :data="data">
    <template #a> {{ data }}</template>
    <template #b>加载中 </template>
    <template #c> 加载失败</template>
  </Show>
</template>
